package com.bank.manage.service.Impl;

import com.bank.manage.model.BankOptRechargeRecords;
import com.bank.manage.model.BankOptSysRecords;
import com.bank.manage.mapper.BankOptSysRecordsMapper;
import com.bank.manage.model.param.BankQueryParam;
import com.bank.manage.service.BankOptSysRecordsService;
import com.mybatisflex.core.query.QueryWrapper;
import com.mybatisflex.spring.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 管理操作记录 服务实现类
 * </p>
 *
 * @author grl
 * @since 2024-04-01
 */
@Service
public class BankOptSysRecordsServiceImpl extends ServiceImpl<BankOptSysRecordsMapper, BankOptSysRecords> implements BankOptSysRecordsService {

    @Override
    public Boolean recordExistQuery(BankQueryParam param) {
        QueryWrapper wrapper = QueryWrapper.create().eq(BankOptSysRecords::getRequestId, param.getRequestId())
                .eq(BankOptSysRecords::getSpecificValue, param.getSpecificValue()).from(BankOptSysRecords.class);
        return exists(wrapper);
    }
}
